{% load rights_simple_tag %}
<form id="pagerForm" method="post" action="{% url 'rights_management' %}">
    {% csrf_token %}

	<input type="hidden" name="pageNum" value="{{ pageNum }}" />
	<input type="hidden" name="numPerPage" value="{{ numPerPage }}" />

</form>


<div class="pageHeader">

</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="{% url 'rights_management' %}add/0/" target="dialog" mask="true" title="添加权限"><span>添加</span></a></li>
            <li><a class="edit" href="{% url 'rights_management' %}update/{sid_user}/" target="dialog" mask="true" title="修改权限"><span>修改</span></a></li>
			<li><a class="delete" href="{% url 'rights_management' %}del/{sid_user}/" target="ajaxTodo" title="确定要删除吗?" callback="dialogAjaxDone"><span>删除</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th>id</th>
				<th>权限名称</th>
				<th>相对url</th>
				<th>状态</th>
{#				<th>父权限名称</th>#}
				<th>创建人</th>
				<th>创建时间</th>
			</tr>
		</thead>
		<tbody>

            {% for obj in rights_objs %}
                <tr target="sid_user" rel="{% get_id obj %}">
                    <td>{{ forloop.counter }}</td>
                    <td>{{ obj.name }}</td>
                    <td>{{ obj.url }}</td>
                    <td>{% if obj.status == "1" %}启用{% else %}不启用{% endif %}</td>
{#                    <td>{% get_parent_name rights_objs obj %}</td>#}
                    <td>{% get_create_username user_data obj.create_user_id %}</td>
                    <td>{{ obj.create_date|date:"Y-m-d H:i:s" }}</td>
                </tr>
            {% endfor %}


		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" {% if numPerPage == 20 %}selected{% endif %}>20</option>
				<option value="50" {% if numPerPage == 50 %}selected{% endif %}>50</option>
				<option value="100" {% if numPerPage == 100 %}selected{% endif %}>100</option>
				<option value="200" {% if numPerPage == 200 %}selected{% endif %}>200</option>
			</select>
			<span>条，共{{ count }}条</span>
		</div>

		<div class="pagination" targetType="navTab" totalCount="{{ count }}" numPerPage="{{ numPerPage }}" pageNumShown="10" currentPage="{{ pageNum }}"></div>

	</div>
</div>
